var vAliRefund = new Vue({
    el: '#aliRefund',
    data: function () {
        return {
        	outTradeNo: '',tradeNo:'',refundAmount:'',refundReason:'',outRequestNo:''
        }
    },
    mounted() {

    },
    methods: {
    	 refund() {
    	    if (this.refundAmount === '' || this.refundAmount === null) {
    	        this.$Message.info("请输入退款金额！");
    	    }
    	    let data = {
    	        outTradeNo: this.outTradeNo,
    	        tradeNo: this.tradeNo,
    	        refundAmount: this.refundAmount,
    	        refundReason: this.refundReason,
    	    };
    	    let url = "/alipay/refund";
    	    callAjaxPost(url, data, this.refundSuc);
    	},

    	refundSuc(data) {
    		if(data.obj.code == '10000'){
    			alert('成功退款共'+data.obj.refund_fee+'元')
    		}
    	},
    	
    	refundQuery(){
    		let data = {
        	        outTradeNo: this.outTradeNo,
        	        tradeNo: this.tradeNo,
        	        outRequestNo: this.outRequestNo,
        	    };
        	    let url = "/alipay/refundQuery";
        	    callAjaxPost(url, data, this.refundQuerySuc);
    	},
    	
    	refundQuerySuc(data){
    		if(data.obj.code == '10000'){
    			alert('本次退款'+data.obj.refund_amount+'元')
    		}
    	}
    	
    }
});





